home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctjsp86.arc
/
KWIKAT.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-06-24
|
895b
|
24 lines
0 '* AT keyboard repeat speedup sets the delay and repeat
1 '* then prints the values according to formulas found
2 '* in the AT Technical Reference
3 '*
4 '* The programming sequence is as follows: first output a command
5 '* (0F3h) then output a delay-and-rate value. Bits 5 and 6 control
6 '* the delay ranging from 250 ms up to 1 second. Bits 0 through 4
7 '* identify the repeat rate, ranging from about 30 repeats per
8 '* second to 2 repeats per second.
9 '*
10 PRINT " AT keyboard speedup"
15 PRINT "=low values are fastest="
20 INPUT "Initial delay (0-3): ",ID
30 INPUT "Repeat rate (0-31): ",RR
40 OUT &H60,&HF3 :OUT &H60,(ID*32)OR RR
45 '** All set. Now calculate speed.
50 PRINT "initial delay is";
60 PRINT (ID+1) * .25;"seconds"
70 A=(RR AND 7) :B=(RR AND 24)\8
80 P=(8+A) * (2^B) * .00417
90 PRINT "repeat rate is";
95 PRINT 1/P;"per second"